package com.bjpowernode.springboot.web;

import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MyController {

    @RequestMapping(value = "/user/detail")
    @ResponseBody//json格式
    public String userDetail() throws InterruptedException {
        for (int i = 0; i < 10; i++) {
            Thread.sleep(1000);
            System.out.println(i);
        }
        return "/user/detail";
    }

    @RequestMapping(value = "/sun")
    @ResponseBody
    public String sun(){
        return "无需过滤";
    }
}
